body {
    font-family: 'Microsoft YaHei', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

.container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.function-group {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.function-title {
    font-size: 1.2em;
    color: #2196F3;
    margin-bottom: 15px;
}

.upload-area {
    border: 2px dashed #ccc;
    padding: 20px;
    text-align: center;
    margin-bottom: 15px;
    cursor: pointer;
    transition: border-color 0.3s;
    position: relative;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #2196F3;
}

.preview-image {
    max-width: 300px;
    max-height: 300px;
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    object-fit: contain;
}

.result-area {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.result-area pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}

.result-area h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #1976D2;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#result {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 20px;
    margin-bottom: 30px;
}

.sidebar-header h2 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}

.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.nav-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: #34495e;
}

.nav-item.active {
    background-color: #3498db;
}

.nav-item a {
    color: white;
    text-decoration: none;
    display: block;
}

.sidebar-footer {
    padding: 20px;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.logout-btn:hover {
    background-color: #c0392b;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: 64px;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: relative;
    z-index: 100;
}

.top-bar h1 {
    margin: 0;
    font-size: 1.4em;
    color: #2c3e50;
    font-weight: 600;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.user-controls:hover {
    background: rgba(255, 255, 255, 0.15);
}

.current-user {
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
}

.current-user::before {
    content: '\f007';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #1976D2;
    font-size: 1.1em;
}

.top-bar .logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: none;
    border-radius: 20px;
    background: #2196F3;
    color: white;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.2);
}

.top-bar .logout-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.top-bar .logout-btn i {
    font-size: 1em;
    transition: transform 0.3s ease;
}

.top-bar .logout-btn:hover i {
    transform: translateX(2px);
}

.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;
}

.page-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.compare-container {
    display: flex;
    gap: 20px;
}

.compare-item {
    flex: 1;
}

.button-group {
    margin: 15px 0;
}

.dashboard {
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-card.full-width {
    grid-column: 1 / -1;
}

.stats-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.2em;
}

.stats-content {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.stat-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
}

.stat-value {
    font-size: 1.5em;
    color: #2c3e50;
    font-weight: bold;
}

.recent-records {
    width: 100%;
    border-collapse: collapse;
}

.recent-records th,
.recent-records td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.recent-records th {
    background-color: #f8f9fa;
    color: #666;
    font-weight: normal;
}

.error-message {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff3f3;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
    color: #d32f2f;
    margin: 10px 0;
}

.error-message h2 {
    color: #c00;
    margin-top: 0;
}

.error-message p {
    color: #666;
    margin-bottom: 0;
}

.result-header {
    margin-bottom: 20px;
}

.result-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.face-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.face-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.face-item img {
    width: 300px;
    height: 300px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.face-label {
    margin-top: 10px;
    color: #666;
}

.error-icon {
    font-size: 24px;
    margin-right: 10px;
}

.error-text {
    font-size: 14px;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.loading::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 为每个页面添加特定背景 */
.main-content[data-page="dashboard"],
.main-content[data-page="detect"],
.main-content[data-page="landmarks"],
.main-content[data-page="compare"],
.main-content[data-page="encoding"] {
    background-image: none;
}

/* 添加到现有样式中 */
.history-container {
    max-height: 400px;
    overflow-y: auto;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.history-time {
    min-width: 150px;
    color: #666;
    font-size: 0.9em;
}

.history-content {
    flex: 1;
}

.history-function {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.history-details {
    color: #666;
    font-size: 0.9em;
}

/* 添加视频背景样式 */
.video-background {
    position: fixed;
    top: 0;
    left: 250px; /* 侧边栏宽度 */
    right: 0;
    bottom: 0;
    z-index: -1;
    overflow: hidden;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    min-width: 100%;
    min-height: 100%;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
}

/* API文档样式 */
.api-docs {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-docs h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
}

.api-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.api-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.api-item h4 {
    color: #2196F3;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.api-item p {
    margin: 15px 0 10px 0;
    font-weight: 500;
    color: #333;
}

.api-item ul {
    margin: 10px 0;
    padding-left: 20px;
    color: #666;
}

.api-item ul li {
    margin: 5px 0;
}

/* 代码样式 */
.api-item code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

/* 图片放大相关样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    cursor: pointer;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90vh;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.modal-image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: calc(90vh - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.modal-content img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: move;
    user-select: none;
    -webkit-user-drag: none;
}

.modal-content img.dragging {
    cursor: grabbing;
    transition: none;
}

/* 确保控制按钮在最上层 */
.zoom-controls {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    z-index: 1003;  /* 确保在图片上层 */
}

.zoom-controls button {
    background: #fff;
    color: #333;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.zoom-controls button:hover {
    background: #2196F3;
    color: white;
}

/* 修改关闭按钮样式 */
.modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 1002;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 为可点击图片添加样式 */
.clickable-image {
    cursor: pointer;
    transition: transform 0.2s;
}

.clickable-image:hover {
    transform: scale(1.05);
}

/* 添加提示框样式 */
.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.alert-box {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
}

.alert-content {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

.alert-buttons {
    display: flex;
    justify-content: center;
}

.alert-button {
    background-color: #2196F3;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.alert-button:hover {
    background-color: #1976D2;
}

/* 添加结果图片样式 */
.result-image {
    width: 300px;
    height: 300px;
    object-fit: contain;
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 添加坐标显示样式 */
.coordinates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 15px;
}

.coordinate-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coordinate-label {
    font-weight: bold;
    color: #2c3e50;
}

.coordinate-values {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    color: #666;
}

.coordinate-values div {
    padding: 5px 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* 仪表板容器 */
.dashboard-container {
    padding: 20px;
    display: grid;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 用户信息卡片样式 */
.user-info-card {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 30px;
    display: flex;
    gap: 25px;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5em;
}

.user-details {
    flex: 1;
}

.user-header {
    margin-bottom: 20px;
}

.user-header h2 {
    margin: 0 0 15px 0;
    font-size: 1.8em;
    font-weight: 600;
}

.account-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px;
    border-radius: 8px;
}

.account-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-field {
    display: flex;
    align-items: center;
    gap: 10px;
}

.password-toggle {
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.3s;
}

.password-toggle:hover {
    opacity: 0.8;
}

.change-password-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    transition: background-color 0.3s;
}

.change-password-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 修改密码模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 25px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}

.modal-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.form-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.form-buttons button[type="button"] {
    background: #f5f5f5;
    color: #666;
}

.form-buttons button[type="submit"] {
    background: #2196F3;
    color: white;
}

/* 统计卡片网格 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: #f0f7ff;
    color: #2196F3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
}

.stats-info h3 {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.stats-info p {
    margin: 5px 0 0;
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
}

/* 性能指标区域 */
.performance-section {
    display: grid;
    gap: 20px;
}

.performance-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.performance-header h3 {
    margin: 0;
    color: #333;
}

.refresh-button {
    background: none;
    border: none;
    color: #2196F3;
    cursor: pointer;
    padding: 5px;
    font-size: 1.1em;
    transition: transform 0.3s ease;
}

.refresh-button:hover {
    transform: rotate(180deg);
}

.performance-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.metric {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    height: 200px; /* 增加高度以容纳图表 */
}

.metric-label {
    color: #666;
    font-size: 0.9em;
}

.metric-value {
    font-size: 1.8em;
    font-weight: 600;
    color: #333;
}

/* 历史记录区域 */
.history-section {
    margin-top: 30px;
}

.history-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
}

.history-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.history-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.history-filter select {
    padding: 6px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    font-size: 0.9em;
    outline: none;
    cursor: pointer;
    background: #f8f9fa;
}

.history-filter select:hover {
    border-color: #2196F3;
}

/* 添加滚动容器 */
.history-list-wrapper {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 4px;
    
    /* 自定义滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #2196F3 #f0f0f0;
}

/* Webkit浏览器的滚动条样式 */
.history-list-wrapper::-webkit-scrollbar {
    width: 6px;
}

.history-list-wrapper::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.history-list-wrapper::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 3px;
}

.history-list-wrapper::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

.history-list {
    padding: 12px 16px;
}

.history-item {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #f8f9fa;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.2s;
}

.history-item:hover {
    transform: translateX(4px);
}

.history-item.success {
    border-left: 4px solid #4CAF50;
}

.history-item.error {
    border-left: 4px solid #f44336;
}

.history-time {
    color: #666;
    font-size: 0.9em;
    white-space: nowrap;
}

.history-content {
    flex: 1;
}

.history-function {
    color: #2c3e50;
    font-weight: 500;
    margin-bottom: 4px;
}

.history-details {
    color: #666;
    font-size: 0.9em;
}

/* 添加趋势指示器样式 */
.stats-trend {
    font-size: 0.8em;
    margin-top: 5px;
}

.stats-trend.up {
    color: #4caf50;
}

.stats-trend.down {
    color: #f44336;
}

/* 自动刷新控制样式 */
.refresh-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auto-refresh {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9em;
    color: #666;
}

/* 历史记录筛选样式 */
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.history-filter select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
    color: #666;
}

/* 登录统计样式 */
.login-count {
    margin-top: 5px;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

/* 图表容器样式 */
.metric-chart {
    height: 100px;
    margin-top: 10px;
}

.user-stats {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.user-stats p {
    margin: 5px 0;
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

/* API文档表格样式优化 */
.api-table {
    width: 100%;
    border-collapse: separate;  /* 改为separate以支持单元格圆角 */
    border-spacing: 0;
    margin: 15px 0;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;  /* 确保圆角生效 */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.api-table th,
.api-table td {
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
    text-align: left;
    font-size: 14px;
}

.api-table th {
    background-color: #f7f9fc;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;  /* 防止表头换行 */
}

/* 名称列样式 */
.api-table td:first-child {
    font-weight: 500;
    color: #2196F3;
    white-space: nowrap;
}

/* 类型列样式 */
.api-table td:nth-child(2) {
    color: #666;
    font-family: monospace;
    white-space: nowrap;
}

/* 必填列样式 */
.api-table td:nth-child(3):not(:last-child) {
    color: #e91e63;
    font-weight: 500;
}

/* 说明列样式 */
.api-table td:last-child {
    text-align: left;
    color: #666;
    line-height: 1.5;
}

.api-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.api-table tr:hover {
    background-color: #f5f9ff;
}

/* 参数说明标题样式 */
.api-item p {
    font-weight: 500;
    margin: 20px 0 10px 0;
    color: #2c3e50;
    font-size: 15px;
    display: flex;
    align-items: center;
}

/* 为标题添加图标 */
.api-item p:before {
    content: '📝';  /* 使用emoji作为图标 */
    margin-right: 8px;
    font-size: 18px;
}

/* 请求参数说明标题特殊样式 */
.api-item p:contains("请求参数说明"):before {
    content: '📤';
}

/* 返回参数说明标题特殊样式 */
.api-item p:contains("返回参数说明"):before {
    content: '📥';
}

/* API文档整体容器样式 */
.api-docs {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.api-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
}

/* 代码示例样式优化 */
.api-docs pre {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #ddd;
    margin: 10px 0;
}

/* API标题样式 */
.api-item h4 {
    color: #2196F3;
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* 参数说明容器样式 */
.params-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* 参数说明标题样式优化 */
.param-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
}

/* 第一个标题去掉上边距 */
.params-container .param-title:first-child {
    margin-top: 0;
}

/* 为标题添加图标 */
.param-title:before {
    content: '📝';
    margin-right: 8px;
    font-size: 18px;
    display: inline-block;
}

/* 请求参数图标 */
.param-title:contains("请求参数说明"):before {
    content: '📤';
}

/* 返回参数图标 */
.param-title:contains("返回参数说明"):before {
    content: '📥';
}

/* 调整表格在容器内的边距 */
.params-container .api-table {
    margin: 10px 0 20px 0;
}

/* 最后一个表格去掉底部边距 */
.params-container .api-table:last-child {
    margin-bottom: 0;
}

/* 优化表格在容器内的视觉效果 */
.params-container .api-table {
    background: white;
    border: 1px solid #e0e0e0;
}

/* 表格圆角优化 */
.params-container .api-table th:first-child {
    border-top-left-radius: 6px;
}

.params-container .api-table th:last-child {
    border-top-right-radius: 6px;
}

/* 表格悬停效果优化 */
.params-container .api-table tr:hover {
    background-color: #f5f9ff;
    transition: background-color 0.2s ease;
}

/* 表格标题居中 */
.api-table th {
    text-align: center;
    background-color: #f7f9fc;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
    padding: 12px 16px;
}

/* 表格内容居中（除了说明列） */
.api-table td {
    text-align: center;
    padding: 12px 16px;
}

/* 说明列保持左对齐 */
.api-table td:last-child {
    text-align: left;
    color: #666;
    line-height: 1.5;
}

/* 调整图标和文字的对齐方式 */
.params-container > p {
    position: relative;
    padding-left: 30px;
}

.params-container > p:before {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

/* 表格列宽控制 */
.api-table th[style*="width"],
.api-table td[style*="width"] {
    width: var(--width);
}

/* 表格标题和内容对齐方式 */
.api-table th,
.api-table td {
    text-align: center;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
}

/* 名称列样式 */
.api-table td:first-child {
    font-weight: 500;
    color: #2196F3;
    white-space: nowrap;
}

/* 类型列样式 */
.api-table td:nth-child(2) {
    color: #666;
    font-family: monospace;
    white-space: nowrap;
}

/* 必填列样式 */
.api-table td:nth-child(3):not(:last-child) {
    color: #e91e63;
    font-weight: 500;
}

/* 说明列样式 */
.api-table td:last-child {
    text-align: left;
    color: #666;
    line-height: 1.5;
}

/* 表头样式 */
.api-table th {
    background-color: #f7f9fc;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
}

/* 参数说明标题样式 */
.param-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
}

/* 参数说明容器统一样式 */
.params-container {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

/* 参数说明标题统一样式 */
.param-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
    margin: 15px 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
    text-align: center;
}

/* 表格统一样式 */
.api-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 10px 0 20px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

/* 表格标题统一样式 */
.api-table th {
    text-align: center;
    background-color: #f7f9fc;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e0e0e0;
    padding: 12px 16px;
    white-space: nowrap;
}

/* 表格内容统一样式 */
.api-table td {
    text-align: center;
    padding: 12px 16px;
    border: 1px solid #e0e0e0;
}

/* 名称列统一样式 */
.api-table td:first-child {
    font-weight: 500;
    color: #2196F3;
    white-space: nowrap;
}

/* 类型列统一样式 */
.api-table td:nth-child(2) {
    color: #666;
    font-family: monospace;
    white-space: nowrap;
}

/* 必填列统一样式 */
.api-table td:nth-child(3):not(:last-child) {
    color: #e91e63;
    font-weight: 500;
}

/* 说明列统一样式 */
.api-table td:last-child {
    text-align: left;
    color: #666;
    line-height: 1.5;
}

/* 表格悬停效果 */
.api-table tr:hover {
    background-color: #f5f9ff;
    transition: background-color 0.2s ease;
}

/* 表格列宽控制 */
.api-table th[style*="width"],
.api-table td[style*="width"] {
    width: var(--width);
}

/* 用户下拉菜单样式 */
.user-dropdown {
    position: relative;
    cursor: pointer;
}

.current-user {
    color: #2c3e50;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.current-user:hover {
    background: rgba(33, 150, 243, 0.1);
}

.current-user::before {
    content: '\f007';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: #1976D2;
    font-size: 1.1em;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 8px 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.user-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #2c3e50;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: #f5f9ff;
    color: #1976D2;
}

.dropdown-item i {
    font-size: 1em;
    width: 20px;
    text-align: center;
}

/* 退出确认弹窗样式 */
.logout-confirm {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.logout-confirm.show {
    opacity: 1;
    visibility: visible;
}

.logout-confirm-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.logout-confirm.show .logout-confirm-box {
    transform: translateY(0);
}

.logout-confirm h3 {
    margin: 0 0 16px 0;
    color: #2c3e50;
}

.logout-confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.logout-confirm-buttons button {
    padding: 8px 24px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.confirm-logout {
    background: #2196F3;
    color: white;
}

.confirm-logout:hover {
    background: #1976D2;
}

.cancel-logout {
    background: #e0e0e0;
    color: #666;
}

.cancel-logout:hover {
    background: #d5d5d5;
}

/* 快速滚动按钮样式 */
.scroll-buttons {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.scroll-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(33, 150, 243, 0.9);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.scroll-button:hover {
    background: #1976D2;
    transform: scale(1.1);
}

.scroll-button:active {
    transform: scale(0.95);
}

/* 添加按钮出现/消失动画 */
.scroll-button.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

.scroll-button.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* 添加测试按钮样式 */
.test-button {
    background-color: #4caf50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-button:hover {
    background-color: #45a049;
}

.test-button i {
    font-size: 1.1em;
}

/* 测试按钮组样式 */
.test-button-group {
    position: relative;
    display: inline-block;
}

.test-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
    min-width: 150px;
    margin-top: 4px;
}

.test-select-dropdown.show {
    display: block;
}

.test-select-item {
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.test-select-item:hover {
    background-color: #f5f5f5;
}

.test-select-item i {
    color: #4caf50;
    font-size: 0.9em;
} 